# name : pandas zipped ExcelWriter (write)
# key : ExcelWriter.zip@pandas
# contributor: Shuguang Sun
# --
# import zipfile
with zipfile.ZipFile('${1:path_to_file.zip}', 'w') as zf:
    with zf.open('${2:filename.xlsx}', 'w') as buffer:
        with pd.ExcelWriter(buffer${3:,
                    date_format = 'YYYY-MM-DD',
                    datetime_format = 'YYYY-MM-DD HH:MM:SS'}) as writer:
            ${4:df1}.to_excel(writer, sheet_name = 'Sheet1')
            ${5:df2}.to_excel(writer, sheet_name = 'Sheet2')